package files;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Iterator;

public class Files {
    public static void main(String[] args) {
        int i=1;
        System.out.println(1);
        File file1 = new File("d:/java/log/cron.log");
        Path path = file1.toPath();
        System.out.println(file1.toPath());
        Iterator<Path> iterator = path.iterator();
        String[] paths = new String[path.getNameCount()];
        int k = 0;
        while (iterator.hasNext()) {
            paths[k++] = iterator.next().toString();
        }
        Path path1 = Path.of("D:/front", paths);
        System.out.println(path1);
    }
}
